//#本地调用

function OnWebReady(data){
	WebOS.onreadly(data);
}



function OnDate(data){
	WebOS.onDate(data);
}



var WebOS = {
	
	OnReadly:function(callback){
		this.onreadly = callback;
	},
			
	args:'',
	
	plus:{},
	
	//------ native funtion ------
	openWebView:function(obj){
		var _obj = {title:obj.title,url:obj.url,args:obj.args};
		window.OS.openWebView(JSON.stringify(_obj));
	},
	openWebViewWithCfg:function(obj){
		var _obj = {title:obj.title,url:obj.url,args:obj.args,webcfg:obj.webcfg};
		window.OS.openWebViewWithCfg(JSON.stringify(_obj));
	},
	onBack:function(){window.OS.onBack()},
	toast:function(_text){window.OS.toast(_text)},
	
	getDate:function(args,callback){
		this.onDate = callback;
		window.OS.getDate(JSON.stringify(args));

	},

	openScene:function(args){
    		window.OS.openScene(args);
    },


    getItem:function(args){
    	return window.OS.getItem(args);
    },

    setItem:function(_obj){
        	window.OS.setItem(JSON.stringify(_obj));
    },


	setOrientation:function(args){
        	window.OS.setOrientation(args);
    },
	
	onreadly:{},
	onDate:{}
	
	
	
};
								




